﻿@{
    ViewBag.Title = "贷款详情";
    //Dictionary<string, object> dInfo = (Dictionary<string, object>)ViewData["dInfo"];
    //List<Dictionary<string, object>> lsScheme = (List<Dictionary<string, object>>)ViewData["lsScheme"];
    //List<Dictionary<string, object>> lsRecord = (List<Dictionary<string, object>>)ViewData["lsRecord"];
    //Dictionary<string, object> dInfo = (Dictionary<string, object>)Model["info"];
    List<Dictionary<string, object>> lsScheme = (List<Dictionary<string, object>>)Model["scheme"];
    List<Dictionary<string, object>> lsRecord = (List<Dictionary<string, object>>)Model["record"];
}
<table class="table table-bordered table-striped" style="font-size: 12px;width: 95%;" >
    <tr>
        <td colspan="7" align="left" style="padding-left: 16px; color: #000; background: #E3EEEF;">
            <strong>还款计划表</strong>
        </td>
    </tr>
    <tr class="tr_header">
        <td style="color: #333" width="8%">
            <b>期数</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款日期</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款本金</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款利息</b>
        </td>
        <td style="color: #333" width="15%">
            <b>合计应还</b>
        </td>
        <td colspan="2">
            &nbsp;
        </td>
    </tr>
    @{
                
        foreach (Dictionary<string, object> dScheme in lsScheme)
        {
        <tr>
            <td>
                @dScheme["期数"]
            </td>
            <td>
                @dScheme["还款日期"].ToString().Replace(" 0:00:00", "")
            </td>
            <td style="text-align:right;padding-right:20px;">
                 @((Library.Common.Utils.StrToFloat(dScheme["还款本金"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td style="text-align:right;padding-right:25px;">
                 @((Library.Common.Utils.StrToFloat(dScheme["还款利息"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td style="text-align:right;padding-right:20px;">
                 @((Library.Common.Utils.StrToFloat(dScheme["还款总计"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        }
    }
    <tr>
        <td colspan="7" align="left" style="padding-left: 16px; color: #000; background: #E3EEEF;">
            <strong>实际还款金额</strong>
        </td>
    </tr>
    <tr class="tr_header">
        <td style="color: #333">
            <b>还款日期</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款本金</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款利息</b>
        </td>
        <td style="color: #333" width="15%">
            <b>逾期罚款</b>
        </td>
        <td style="color: #333">
            <b>到期日期</b>
        </td>
        <td style="color: #333" width="15%">
            <b>还款总额</b>
        </td>
         <td>
            &nbsp;
            </td>
    </tr>
    @{
        foreach (Dictionary<string, object> dRecord in lsRecord)
        {
                
        <tr>
            <td >
                @dRecord["还款日期"].ToString().Replace(" 0:00:00", "")
            </td>
            <td style="text-align:right;padding-right:25px;">
                 @((Library.Common.Utils.StrToFloat(dRecord["还款本金"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td style="text-align:right;padding-right:25px;">
                 @((Library.Common.Utils.StrToFloat(dRecord["还款利息"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td style="text-align:right;padding-right:20px;">
                 @((Library.Common.Utils.StrToFloat(dRecord["逾期罚款"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td>
                @dRecord["到期日期"].ToString().Replace(" 0:00:00", "")
            </td>
            <td style="text-align:right;padding-right:16px;">
                 @((Library.Common.Utils.StrToFloat(dRecord["总额"].ToString(), 0F).ToString("#,##0.00"))) 元
            </td>
            <td>
            &nbsp;
            </td>
        </tr>
        }
    }
</table>
